﻿<%@ Page Language="C#" MasterPageFile="~/manage/mode_admin.master" EnableEventValidation ="false"  AutoEventWireup="true" CodeFile="BBS.aspx.cs" Inherits="manage_BBS" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:Label ID="Tittle" runat="server"></asp:Label>
    <asp:GridView ID="BBS" runat="server" CellPadding="3" 
        Width="553px" AutoGenerateColumns="False" BackColor="#DEBA84" 
        BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px" CellSpacing="2" 
        DataKeyNames="ID" onrowdeleting="BBS_RowDeleting" AllowPaging="True" 
        onpageindexchanging="BBS_PageIndexChanging" 
        onrowcancelingedit="BBS_RowCancelingEdit" onrowediting="BBS_RowEditing" 
        onrowupdating="BBS_RowUpdating" PageSize="5" Height="79px" 
        AutoGenerateDeleteButton="True" AutoGenerateEditButton="True" EnableViewState="False" >
        <FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
        <RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
        <Columns>
            <asp:TemplateField HeaderText="序号">
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("ID") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server" Enabled="False" 
                        Text='<%# Bind("ID") %>' Width="50%"></asp:TextBox>
                </EditItemTemplate>
                <ItemStyle Width="10%" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="内容" SortExpression="content">
                <ItemTemplate>
                    <asp:Label ID="Label2" runat="server" Text='<%# Bind("content") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("content") %>' Width="80%" TextMode="MultiLine" CausesValidation="True"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TextBox2"
                        ErrorMessage="无效输入">×</asp:RequiredFieldValidator>
                </EditItemTemplate>
                <ItemStyle Width="50%" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="发布时间">
                <ItemTemplate>
                    <asp:Label ID="Label3" runat="server" Text='<%# Bind("postTime") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox3" runat="server" Enabled="False" 
                        Text='<%# Bind("postTime") %>' Width="80%"></asp:TextBox>
                </EditItemTemplate>
                <ItemStyle Width="20%" />
            </asp:TemplateField>
        </Columns>
        <PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
    </asp:GridView>
    <asp:Button ID="DeleteAll" runat="server" Text="删除所有" CausesValidation="False" 
        onclick="DeleteAll_Click" />
    &nbsp;<asp:Button ID="WordOut" runat="server" CausesValidation="False" 
        onclick="WordOut_Click" Text="公告导出到Word" />
    &nbsp;<asp:Label ID="Updates" runat="server"></asp:Label>
    <br />
    <br />
    <br />
    <asp:Label ID="AddBBS" runat="server" Text="添加公告："></asp:Label>
    <br />
    <br />
    <asp:Label ID="BBSContentTitle" runat="server" Text="公告内容"></asp:Label>
    <asp:TextBox ID="BBSContent" runat="server" ValidationGroup="x" CausesValidation="True"></asp:TextBox>&nbsp;
    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="BBSContent"
        ErrorMessage="无效输入" ValidationGroup="x">内容不能为空</asp:RequiredFieldValidator><br />
    <br />
    <br />
    <asp:Button ID="Save" runat="server" Text="保存" onclick="Save_Click" ValidationGroup="x" />
    &nbsp;&nbsp;&nbsp;
    <asp:Button ID="Reset" runat="server" Text="重置" CausesValidation="False" 
        onclick="Reset_Click" />
    &nbsp;&nbsp;<asp:Label ID="InsertFlags" runat="server"></asp:Label>
    &nbsp;
    <asp:Label ID="UpdateFlags" runat="server"></asp:Label>
    <br />
</asp:Content>

